var config = require('../config');

var Project = require('../models').Project;

/** 
 * 新增一个项目
 **/
exports.createProject = function (title, content, callback) {
    var project = new Project();
    project.title = title;
    project.content = content;
    project.save(callback);
}

/** 
 * 查询一个项目
 **/
exports.findProjectById = function (id, callback) {
    Project.findOne({_id: id}, callback);
}